/*
 * @Descripttion: 
 * @version: 
 * @Author: turingchang
 * @Date: 2020-08-28 14:32:50
 * @LastEditors: turingchang
 * @LastEditTime: 2020-08-28 17:09:59
 */

'use strict';
const BaseController = require('./base/base');

class UserController extends BaseController {
    async list() {
        const ctx = this.ctx;    
        var data = await ctx.service.user.list();
        ctx.outSuccess(null,data);
    }
    async get() {
        const ctx = this.ctx;    
        var data = await ctx.service.user.get(this.querydata.id);
        ctx.outSuccess(null,data);
    }
    async create() {
        const ctx = this.ctx;  
        var data = await ctx.service.user.create(ctx.request.body);
        ctx.outSuccess(null,data);
    }
}

module.exports = UserController;